﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.ServiceModel;
using System.Text;
using CallbackClient.ServiceReference1;
using IMyContractCallback = CallbackService.IMyContractCallback;

namespace CallbackClient
{
    class Program
    {
        static void Main(string[] args)
        {
            IMyContractCallback callback = new MyCallback();
            InstanceContext cntx = new InstanceContext(callback);

            //ServiceReference1.MyContractClient proxy = new MyContractClient(cntx);
            MyServiceClient proxy = new MyServiceClient(cntx);
            Console.WriteLine("Client call the MyMethod Operation from Service.");
            int k = proxy.MyMethod();
            Console.WriteLine("Sum = " + k);
            Console.ReadLine();

        }
    }
}
